package com.cy.service;

import com.cy.dao.EmpDao;
import com.cy.pojo.Emp;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class EmpServiceImpl implements  EmpService{
    @Autowired
    EmpDao empDao;
    @Override
    public List<Emp> sel(Emp emp) {
        return empDao.sele(emp);
    }

    /**
     * 插入Emp
     * @param emp
     * @return
     */
    @Override
    public int ins(Emp emp) {
        return empDao.inset(emp);
    }

    /**
     *
     * @param emp
     * @return
     */
    @Override
    public int upd(Emp emp) {
        return empDao.upda(emp);
    }

    @Override
    public int dele(Long[] ids ) {
        return empDao.dele(ids);
    }
}
